/**
 * @author LKQ
 * @date 2022/1/8 17:08
 * @description 计数
 */
public class Solution {
    public static void main(String[] args) {

    }
    public char findTheDifference(String s, String t) {
        int n = t.length();
        int[] arr = new int[26];
        for (int i = 0; i < n; i++) {
            arr[t.charAt(i) - 'a']++;
            if (i != n-1) {
                arr[s.charAt(i) - 'a']--;
            }
        }
        char ans = 0;
        for (int i = 0; i < 26; i++) {
            if (arr[i] == 1) {
                ans =  (char) (i + 'a');
                break;
            }
        }
        return ans;
    }
}
